package com.qxf.model.beans;

import java.util.List;

import com.qxf.model.BaseResult;

public class UserSession extends BaseResult {

	/** 用户id */
	private String userId;
	/** 客户用户名 */
	private String userName;
	/** 客户代码 */
	private String userCode;
	/** 当前活动信息 */
	private ActivityBean activityInfo;
	/** 所有活动信息 */
	private List<ActivityBean> activityInfoList;
	/** 所有媒体 */
	private List<MediaBean> mediaInfoList;
	
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public boolean isLogin() {
		if(null != userName && userName.length() > 0
				&& null != userId && userId.length() > 0
				/*&& null != userCode && userCode.length() > 0*/) {
			return true;
		}
		return false;
	}

	public boolean isInActivity() {
		if(null != userName && userName.length() > 0
				&& null != userId && userId.length() > 0
				&& null != activityInfo && null != activityInfo.getActivityId() && activityInfo.getActivityId().length() > 0
				/*&& null != userCode && userCode.length() > 0*/) {
			return true;
		}
		return false;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

	public ActivityBean getActivityInfo() {
		return activityInfo;
	}

	public void setActivityInfo(ActivityBean activityInfo) {
		this.activityInfo = activityInfo;
	}

	public List<ActivityBean> getActivityInfoList() {
		return activityInfoList;
	}

	public void setActivityInfoList(List<ActivityBean> activityInfoList) {
		this.activityInfoList = activityInfoList;
	}

	public List<MediaBean> getMediaInfoList() {
		return mediaInfoList;
	}

	public void setMediaInfoList(List<MediaBean> mediaInfoList) {
		this.mediaInfoList = mediaInfoList;
	}

}
